package com.younion.vo;

import java.util.Date;

import com.younion.util.DateUtil;

import cpcns.component.common.base.BaseVO;
import cpcns.persister.converter.IDomainObject;
import cpcns.persister.service.CompositeID;


 
public class CostVO extends BaseVO implements IDomainObject,Cloneable{

	/**  */
	private static final long serialVersionUID = -1L;

 
	private Integer id;

 
	private MemberCardVO cardEntity;

 
	private Double money;

 
	private String type;
 
	private String description;

 
	private Date costDate;
	
	private UserVO operator;

 
	private Integer score;
	
	private ProductVO product;
	
	
	//Search properties 
	//TODO: extract to a single object
	private Double gtmoney;
	private Double ltmoney;
	private Integer gtscore;
	private Integer ltscore;
	private Date gtcostDate;
	private Date ltcostDate;
	private CustomerVO customer;
	
	private Integer customerId;
	private String customerName;
	
	private Integer memberCardId;
	private String memberName;
	private Integer operatorId;
	private String operatorName;
	private Integer productId;
	private String productName;
	private Double productPrice;
	private Integer productPoint;
	private String memberCode;
	

	/**
	 * 
	 */
	public CostVO() {
	}

	/** 
	 * @return the id
	 */ 
	public Integer getId() {
		return id;
	}

	/** 
	 * @param id the id to set 
	 */ 
	public void setId(Integer id) {
		this.id = id;
	}

	/** 
	 * @return the cardId
	 */ 
	 
	/** 
	 * @return the money
	 */ 
	public Double getMoney() {
		return money;
	}

	/** 
	 * @param money the money to set 
	 */ 
	public void setMoney(Double money) {
		this.money = money;
	}

	/** 
	 * @return the type
	 */ 
	public String getType() {
		return type;
	}

	/** 
	 * @param type the type to set 
	 */ 
	public void setType(String type) {
		this.type = type;
	}

	/** 
	 * @return the description
	 */ 
	public String getDescription() {
		return description;
	}

	/** 
	 * @param description the description to set 
	 */ 
	public void setDescription(String description) {
		this.description = description;
	}

	/** 
	 * @return the costDate
	 */ 
	public Date getCostDate() {
		return costDate;
	}

	/** 
	 * @param costDate the costDate to set 
	 */ 
	public void setCostDate(Date costDate) {
		this.costDate = costDate;
	}

	/** 
	 * @return the score
	 */ 
	public Integer getScore() {
		return score;
	}

	/** 
	 * @param score the score to set 
	 */ 
	public void setScore(Integer score) {
		this.score = score;
	}

	public CompositeID getCompositeID(){
		CompositeID _id = super.getCompositeID();
		_id.clear();
		if(id != null){
			_id.addKey("id", id);
		}
		return _id;
	}

	public MemberCardVO getCardEntity() {
		return cardEntity;
	}

	public void setCardEntity(MemberCardVO cardEntity) {
		this.cardEntity = cardEntity;
	}

	public ProductVO getProduct() {
		return product;
	}

	public void setProduct(ProductVO product) {
		this.product = product;
	}

	public UserVO getOperator() {
		return operator;
	}

	public void setOperator(UserVO operator) {
		this.operator = operator;
	}

	public Double getGtmoney() {
		return gtmoney;
	}

	public void setGtmoney(Double gtmoney) {
		this.gtmoney = gtmoney;
	}

	public Double getLtmoney() {
		return ltmoney;
	}

	public void setLtmoney(Double ltmoney) {
		this.ltmoney = ltmoney;
	}

	public Integer getGtscore() {
		return gtscore;
	}

	public void setGtscore(Integer gtscore) {
		this.gtscore = gtscore;
	}

	public Integer getLtscore() {
		return ltscore;
	}

	public void setLtscore(Integer ltscore) {
		this.ltscore = ltscore;
	}

	public Date getGtcostDate() {
		return gtcostDate;
	}

	public void setGtcostDate(Date gtcostDate) {
		this.gtcostDate = gtcostDate;
	}

	public Date getLtcostDate() {
		return ltcostDate;
	}

	public void setLtcostDate(Date ltcostDate) {
		this.ltcostDate = ltcostDate;
	}
	
	public String getGtcostDateStr(){
		return DateUtil.toStrDateFromUtilDateByFormat(gtcostDate, DateUtil.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS);
	}
	public String getLtcostDateStr(){
		return DateUtil.toStrDateFromUtilDateByFormat(ltcostDate, DateUtil.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS);
	}

	public CustomerVO getCustomer() {
		return customer;
	}

	public void setCustomer(CustomerVO customer) {
		this.customer = customer;
	}

	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public Integer getMemberCardId() {
		return memberCardId;
	}

	public void setMemberCardId(Integer memberCardId) {
		this.memberCardId = memberCardId;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public Integer getOperatorId() {
		return operatorId;
	}

	public void setOperatorId(Integer operatorId) {
		this.operatorId = operatorId;
	}

	public String getOperatorName() {
		return operatorName;
	}

	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public Double getProductPrice() {
		return productPrice;
	}

	public void setProductPrice(Double productPrice) {
		this.productPrice = productPrice;
	}

	public Integer getProductPoint() {
		return productPoint;
	}

	public void setProductPoint(Integer productPoint) {
		this.productPoint = productPoint;
	}

	public String getMemberCode() {
		return memberCode;
	}

	public void setMemberCode(String memberCode) {
		this.memberCode = memberCode;
	}
	
	
}
